package com.xhb.biz.feign;

import feign.*;

import java.util.Map;

/**
 * @author tanyukun
 */
public interface UserTokenService {

    /**
     * 浏览器用户登录接口
     *
     * @param params 请求头
     * @return
     * @throws RuntimeException
     */
    @RequestLine("POST /browser/browserUserLoginToken/login")
    @Headers("Content-Type: application/json")
    @Body("{params}")
    String login(@Param("params") String params) throws RuntimeException;


    /**
     * 浏览器用户登出接口
     * @param headers   请求头
     * @return
     * @throws RuntimeException
     */
    @RequestLine("POST /browser/browserUserLoginToken/logout")
    String logout(@HeaderMap Map<String, Object> headers) throws RuntimeException;

    /**
     * 检查 token 是否过期
     * @param headers   请求头
     * @return
     * @throws RuntimeException
     */
    @RequestLine("GET /browser/browserUserLoginToken/checkTokenStatus")
    String checkTokenStatus(@HeaderMap Map<String, Object> headers) throws RuntimeException;

}
